package cn.zhanghu;

/**
 * Created by dell on 2017/7/19.
 */
 class Banana {
    private String color;
    private double weight;
    public Banana(){}
    public Banana(String color,double weight){
        this.color=color;
        this.weight=weight;
    }
    @Override
    public String toString(){
        return "Banana[color is :"+color+"   weight is :"+weight+"]";
    }
}
public class ToStringTest{
    public static void main(String[] args) {
        Banana banana=new Banana("yellow",3.45);
        System.out.println(banana);
    }
}
